{% extends "base_documentation.html" %}
{%block title%}
Dokümantasyon kategori tanımlamaları 
{%endblock%}
{%block content%}

{% if authform %}
 <div id="contentdiv">  
    <div id="itsthetable" >
                        {% if authform.errors %}
                                <p style="color: red;">
                                   Bilgilerinizde hata var.. ({{ authform.errors }}).
                                </p>
                        {% endif %}
       
                      
						<table>
						 <form method="post" action="/documentation/accounts/login/auth/"><!--{ % csrf_token % }-->
						<tbody>
						<tr>
						    <th>{{ authform.username.label_tag }}</th>
						    <td>{{ authform.username }}</td>
						</tr>
						<tr>
						    <th>{{ authform.password.label_tag }}</th>
						    <td>{{ authform.password }}</td>
						</tr>
						<tfoot>
						<tr>
						<th>&nbsp;</th>
						<td>
						<input type="submit" value="Tamam" />
						<input type="hidden" name="next" value="{djangoparentezleri ile doldur next }" />
						</td>
						</tr>
						</tfoot>
						</tbody>
						</form>
						</table>
						
						
	{% if xmsg %}
		<ul>
			<li>
				{{xmsg}}
			</li>
		<ul>	
	{% endif %}
	
    </div>
</div>
{% endif %}

{% if authformedit %}
 <div id="contentdiv">  
    <div id="itsthetable" >
                        {% if authformedit.errors %}
                                <p style="color: red; font: 10px Cambria, Serif;">
                                   Bilgilerinizde hata var.. ({{ authformedit.errors }}).
                                </p>
                        {% endif %}
       
                      
						
						 <form method="post" action="/documentation/accounts/profile/{{xusername}}/save/">
						<input id="id_username" type="hidden" name="username" value="{{xusername}}" maxlength="30" />
						<input type="hidden" name="last_login" value="{{xlast_login}}" id="id_last_login" />
						<input type="hidden" name="date_joined" value="{{xdate_joined}}" id="id_date_joined" />
						<input type="hidden" name="is_superuser" value ="{{xis_superuser}}" id="id_is_superuser" />
						<input type="hidden" name="is_staff" value="{{xis_staff}}" id="id_is_staff" />
						<table>
						<tbody>
						<tr>
							<th>{{authformedit.username.label_tag}}&nbsp;:</th>
							<td>{{usr.username}}</td>
						</tr>
						<tr>
							<th>{{authformedit.first_name.label_tag}}&nbsp;:</th>
							<td>{{authformedit.first_name}}</td>
						</tr>
						<tr>
							<th>{{authformedit.last_name.label_tag}}&nbsp;:</th>
							<td>{{authformedit.last_name}}</td>
						</tr>
						<tr>
							<th>{{authformedit.password.label_tag}}&nbsp;:</th>
							<td>{{authformedit.password}}<br><small>{{authformedit.password.help_text|safe}}</small></td>
						<tr>
							<th>{{authformedit.email.label_tag}}&nbsp;:</th>
							<td>{{authformedit.email}}</td>
						</tr>
						<tr>
							<th>{{authformedit.is_active.label_tag}}&nbsp;:</th>
							<td>{{authformedit.is_active}}</td>
						</tr>
						{% if perms.documentation.change_users %}
						<tr>
							<th>{{authformedit.groups.label_tag}}&nbsp;:</th>
							<td>{{authformedit.groups}}&nbsp;<a href="javascript:void(0);" onclick="PopupCenter('documentation/accounts/groups/', 'myPop1',584,400);"><img src="/media/img/admin/icon_changelink.gif"/></a>
							<br><small>{{authformedit.groups.help_text}}</small></td>
						</tr>
						
						<tr>
							<th>{{authformedit.user_permissions.label_tag}}&nbsp;:</th>
							<td>{{authformedit.user_permissions}}<br><small>{{authformedit.user_permissions.help_text}}</small></td>
						</tr>
						
						<tr>
							<th>Düzenleyebileceğiniz Kullanıcılar&nbsp;:</th>
							<td>{% for u in usrlist %}<a href="/documentation/accounts/profile/{{u.username}}/edit/">{{u.first_name|lower|capfirst}}&nbsp;{{u.last_name|lower|capfirst}}</a>{% if forloop.counter|divisibleby:"4"%}<br>{%else%}&nbsp;<font color="#CCCCCC">|</font>&nbsp;{%endif%}{%endfor%}</td>
						</tr>
						{% else %}
						<tr>
							<th>Yetkilerine Sahip Olduğu Kullanıcı Grupları&nbsp;:</th>
							<td>{%if usr.groups.all%}{% for grp in usr.groups.all %}{{grp.name}}&nbsp;{%endfor%}{%else%}-{%endif%}</td>
						</tr>
						{% endif %}
						<!--{{authformedit}}-->
						<tfoot>
						<tr>
						<th>&nbsp;</th>
						<td>
							
							<input type="submit" value="Kaydet" />&nbsp;<a href="/documentation/">Vazgeç</a>
							
						</form>
							
						</td>
						</tr>
						
						</tfoot>
						</tbody>
						
						</table>
						
						
	{% if xmsg %}
		<ul>
			<li>
				{{xmsg}}
			</li>
		<ul>	
	{% endif %}
	
    </div>
</div>
{% endif %}


{% if passchangeform %}
<div id="contentdiv">  
    <div id="itsthetable" >
    {% if passchangeform.errors %}
                                <p style="color: red; font: 10px Cambria, Serif;">
                                   Bilgilerinizde hata var.. ({{ passchangeform.errors }}).
                                </p>
    {% endif %}
    <form method="post" action="/documentation/accounts/profile/{{xusername}}/save/password/">
    <table>
    <tbody>
    {{passchangeform}}
    </tbody>
    <tfoot>
	<tr>
	<th>&nbsp;</th>
	<td>
		<input type="submit" value="Kaydet" />&nbsp;<a href="/documentation/accounts/profile/{{xusername}}/edit/">Vazgeç</a>
	</form>
	</td>
	</tr>
	</tfoot>
    </table>
    {{xmsg}}
    </div>
</div>    
{% endif %}
{%endblock%}
{%block script%}
<link rel="stylesheet" href="/media/css/jquery.treeview.css" />
<script src="/media/js/jquery.cookie.js" type="text/javascript"></script>
<script type="text/javascript" src="/media/js/jquery.treeview.js"></script>
<script>
function PopupCenter(pageURL, title,w,h) {
	var mydomain=window.location.href.match(/:\/\/(.[^/]+)/)[1];
	//alert(mydomain);
	var pageURL="http://"+mydomain+"/"+pageURL;
	//alert("2 : "+pageURL);
	
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);

}
</script>
<link rel="stylesheet" type="text/css" href="/media/css/table-orange.css" />



{%endblock%}